<?php

class PutinDataModel
{
    public static function returnData()
    {
        $ext_json = [
            "bid_range_tips" => "0.50~0.65"
        ];
        $ext_json = json_encode($ext_json);

        $mp_conf = ["original_age" => [14, 60],
            "poi_show" => 0,
            "version" => [],
            "city_level" => 3,
            "custom_poi" => [],
            "import_target_used" => false,
            "dmp_type" => "",
            "selected_ocpm_item" => false,
            "bid_action_type" => 0,
            "target_key" => "1563506319461-2833673",
            "common_metric" => [
                "metrics" => [
                    [
                        "event_id" => 100029,
                        "event_value" => 50,
                        "ext_json" => $ext_json
                    ]
                ],

                "timestamp" => 1563506364
            ]];
        $mp_conf = json_encode($mp_conf);


        $strategy_opt = [
            "bid_action_type" => 2,
            "bid_objective" => 2,
            "bid_objective_mode" => 1
        ];
        $strategy_opt = json_encode($strategy_opt);


        $expand_targeting_setting = [];
        $expand_targeting_setting = json_encode($expand_targeting_setting);


        $ad_behavior = [
            [
                "in_action_list" => [],
                "not_in_action_list" => [101]
            ]
        ];
        $ad_behavior = json_encode($ad_behavior);

        $education = [];
        $education = json_encode($education);

        $device_price = [];
        $device_price = json_encode($device_price);

        $area = ["1324667671606350023"];
        $area = json_encode($area);


        $travel_area = [];
        $travel_area = json_encode($travel_area);

        $gender = [];
        $gender = json_encode($gender);

        $age = ["14~60"];
        $age = json_encode($age);

        $device_brand_model = [];
        $device_brand_model = json_encode($device_brand_model);

        $businessinterest = [];
        $businessinterest = json_encode($businessinterest);

        $app_behavior = [];
        $app_behavior = json_encode($app_behavior);

        $os = [];
        $os = json_encode($os);

        $marriage_status = [];
        $marriage_status = json_encode($marriage_status);

        $wechatflowclass = [];
        $wechatflowclass = json_encode($wechatflowclass);

        $connection = [];
        $connection = json_encode($connection);

        $telcom = [];
        $telcom = json_encode($telcom);

        $payment = [];
        $payment = json_encode($payment);

        $custom_poi = [];
        $custom_poi = json_encode($custom_poi);

        $oversea = [];
        $oversea = json_encode($oversea);

        $in_dmp_audience = [];
        $in_dmp_audience = json_encode($in_dmp_audience);

        $not_in_dmp_audience = [];
        $not_in_dmp_audience = json_encode($not_in_dmp_audience);

        $weapp_version = [
            "min_ios_version" => 0,
            "min_android_version" => 0,
            "min_ios_os_version" => "",
            "min_android_os_version" => ""
        ];
        $weapp_version = json_encode($weapp_version);

        $behavior_interest = [
            "behavior" => [
                [
                    "category" => [104],
                    "keyword" => [],
                    "keyword_detail" => [],
                    "scene" => [1],
                    "time_window" => [3],
                    "strength" => [1]
                ]
            ]

        ];
//$behavior_interest=json_encode($behavior_interest);


        $a = ["pos_type" => 7,
            "product" => ["product_type" => "PRODUCTTYPE_WECHAT",
                "product_id" => "wx67939a06d94c171b",
                "product_info" => ""],


            "campaign" => ["cid" => 0,
                "ctype" => "CAMPAIGNTYPE_AUCTION",
                "cname" => "20190719-推广我的公众号-小程序banner广告-竞价购买广告",
                "end_time" => 1566057599,
                "begin_time" => 1563465600],


            "sub_product" => ["subordinate_product_id" => "",
                "product_type" => "PRODUCTTYPE_WECHAT",
                "product_id" => "",
                "spname" => ""],


            "target_groups" => [
                0 => [
                    "target_group" => [
                        "mp_conf" => $mp_conf
                    ],
                    "ad_groups" => [
                        [
                            "ad_group" => [
                                "aid" => 0,
                                "aname" => "合肥市-和平路-全部-14至60岁",
                                "timeset" => "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
                                "product_id" => "wx67939a06d94c171b",
                                "product_type" => "PRODUCTTYPE_WECHAT",
                                "end_time" => 1566057599,
                                "begin_time" => 1563465600,
                                "strategy_opt" => $strategy_opt,
                                "bid" => 50,
                                "budget" => 1000000,
                                "day_budget" => 1000000,
                                "contract_flag" => 2,
                                "pos_type" => 7,
                                "exposure_frequency" => 6,
                                "poi" => "",
                                "expand_targeting_switch" => "EXPAND_TARGETING_SWITCH_CLOSE",
                                "expand_targeting_setting" => $expand_targeting_setting,
                                "time_mode" => 0
                            ],
                            "ad_target" => [
                                "mid" => 0,
                                "ad_behavior" => $ad_behavior,
                                "education" => $education,
                                "device_price" => $device_price,
                                "area" => $area,
                                "travel_area" => $travel_area,
                                "area_type" => "area",
                                "gender" => $gender,
                                "sns_optimal_user_group" => "",
                                "age" => $age,
                                "device_brand_model" => $device_brand_model,
                                "businessinterest" => $businessinterest,
                                "app_behavior" => $app_behavior,
                                "os" => $os,
                                "marriage_status" => $marriage_status,
                                "wechatflowclass" => $wechatflowclass,
                                "connection" => $connection,
                                "telcom" => $telcom,
                                "payment" => $payment,
                                "custom_poi" => $custom_poi,
                                "weapp_version" => $weapp_version,
                                "oversea" => $oversea,
                                "in_dmp_audience" => $in_dmp_audience,
                                "not_in_dmp_audience" => $not_in_dmp_audience,
                                "behavior_interest" => $behavior_interest
                            ],
                        ]
                    ]
                ],
            ],


            "expected_ret" => 0,
            "materials" => [
                [
                    "tname" => "创意-20190719",
                    "crt_size" => 666
                ]


            ]


        ];
        return $a;
    }
}